package com.sloan.community.repository;

import com.sloan.community.po.User;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.Set;

@Repository
public interface UserRepository extends R2dbcRepository<User, Long> {

    Mono<User> findByOuth2UserIdAndAuthFrom(String oauth2UserId,Integer authFrom);

    Flux<User> findByIdIsIn(Set<Long> userIds);
}
